<?php
namespace Lib\Controller;
use \Zend_Controller_Action,
    \Doctrine\ORM\EntityManager,
    \Lib\ResLoader;
/**
 * @property \Doctrine\ORM\EntityManager
 */
class InvokedController extends \Zend_Controller_Action{
    
    private $_em = null;
    /**  
	 * Gets Entity manager
	 * 
	 * @since 23 июня 2010
	 * @author diotheos
	 * @return \Doctrine\ORM\EntityManager
	 */
    public function getEntityManager(){
        if(!$this->_em instanceof \Doctrine\ORM\EntityManager){
            $this->_em = ResLoader::getResource('Doctrine2');
        }
        return $this->_em;
    }
    
    /**
     *
     * @return \Zend_Controller_Request_Http
     */
    public function getRequest(){
        return parent::getRequest();
    }
}